package com.sven.cloudseatastock.controller;

import com.sven.cloudseatastock.service.StockService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("stock")
public class StockController {

    @Resource
    private StockService stockService;

    @PostMapping("/decrement")
    public String decrement(){
        stockService.decrement();
        return "成功";
    }

}